session_start(); ?>
$time = time () ; //This line gets the current time off the server $today = date("d/m/Y",$time); //This line formats $hotelid = $_GET['hid']; if(!isset($_SESSION['adate'])) { $date = $today; list($day, $month, $year) = explode('/', $date); $_SESSION['adate'] = $year.'/'.$month.'/'.$day; } else { $date = $_SESSION['adate']; } list($year, $month, $day) = explode('/', $date); $datelr = $year.'-'.$month.'-'.$day; $datefx = $year.''.$month.''.$day; if(!isset($_SESSION['nights'])) { $nights = 1; $_SESSION['nights'] = $nights; } else $nights = $_SESSION['nights']; $doc = new DOMDocument(); $doc->load( 'http://xmlfeed.laterooms.com/index.aspx?aid=9031&rtype=3&hids='.$hotelid.'&sdate='.$datelr.'&nights='.$nights ); $hotels = $doc->getElementsByTagName( "hotel" ); foreach ( $hotels as $hotel ) { $references = $hotel->getElementsByTagName( "hotel_ref" ); $ref = $references->item(0)->nodeValue; $names = $hotel->getElementsByTagName( "hotel_name" ); $name = $names->item(0)->nodeValue; $namef = str_replace(" ", "-", $name); $addresses = $hotel->getElementsByTagName( "hotel_address" ); $address = $addresses->item(0)->nodeValue; $stars = $hotel->getElementsByTagName( "hotel_star" ); $star = $stars->item(0)->nodeValue; $awarders = $hotel->getElementsByTagName( "star_awarded_by" ); $awarder = $awarders->item(0)->nodeValue; $ratings = $hotel->getElementsByTagName( "customer_rating" ); $rating = $ratings->item(0)->nodeValue; $descriptions = $hotel->getElementsByTagName( "hotel_description" ); $description = $descriptions->item(0)->nodeValue; $directionss = $hotel->getElementsByTagName( "hotel_directions" ); $directions = $directionss->item(0)->nodeValue; $counties = $hotel->getElementsByTagName( "hotel_county" ); $county = $counties->item(0)->nodeValue; $check_ins = $hotel->getElementsByTagName( "check_in" ); $check_in = $check_ins->item(0)->nodeValue; $check_outs = $hotel->getElementsByTagName( "check_out" ); $check_out = $check_outs->item(0)->nodeValue; $links = $hotel->getElementsByTagName( "hotel_link" ); $link = $links->item(0)->nodeValue; $linkf = str_replace(" ","",$link); $lrrates = $hotel->getElementsByTagName( "lr_rates" ); foreach( $lrrates as $lrrate ) { $hotel_rooms = $lrrate->getElementsByTagName('hotel_rooms'); foreach( $hotel_rooms as $hotel_room ) { $rooms = $hotel_room->getElementsByTagName('room'); $rfaccount = 0; foreach( $rooms as $room ) { $rrefs = $room->getElementsByTagName( "ref" ); $rref = $rrefs->item(0)->nodeValue; $roomfacilities = $room->getElementsByTagName( "room_facilities" ); foreach( $roomfacilities as $roomfacilitie ) { $r_facilities = $roomfacilitie->getElementsByTagName( "room_facility" ); foreach( $r_facilities as $r_facility ) { $rf_groups = $r_facility->getElementsByTagName('facility_group_name'); foreach($rf_groups as $rf_group){ $rfac_group = $rf_group->nodeValue; $rfac_present ++; } } } } } } // geo sub node $geos = $hotel->getElementsByTagName( "geo_code" ); foreach( $geos as $geo ) { $longs = $geo->getElementsByTagName( "long" ); $long = $longs->item(0)->nodeValue; $lats = $geo->getElementsByTagName( "lat" ); $lat = $lats->item(0)->nodeValue; } // images sub node $images = $hotel->getElementsByTagName( "images" ); foreach( $images as $image ) { $urls = $image->getElementsByTagName('url'); $piccount = 0; foreach($urls as $url){ $pic = $url->nodeValue; $piccount ++; } } // facilities sub node $facilities = $hotel->getElementsByTagName( "facilities" ); foreach( $facilities as $facilitie ) { $facilitys = $facilitie->getElementsByTagName('facility'); $faccount = 0; foreach($facilitys as $facility){ $fac = $facility->nodeValue; $faccount ++; } } } ?>Unfortunately the details for this hotel are currently unavailable, please visit our hotel search page to find and book hundreds more hotels across scotland.
} ?> if ($ref != "") {?>echo "$description"; ?>
To check live availability and book a room at
Warning: Undefined variable $name in /var/www/vhosts/hotelsinscotland.org/httpdocs/hotel-details.php on line 368
please follow the link below.
For extra piece of mind, our booking process is handled by Laterooms.com and will open in a new window.
foreach($facilitys as $facility){ $fac = $facility->nodeValue; $facarray[] = $fac; } ?>
| ', PHP_EOL;
}
?>
echo $directions; ?>
For those of you using satellite navigation systems, our full address is;
echo $name; ?>
echo $address; ?>